/**
 * 复制文字到粘贴板
 * @param {string} content 
 */
export const addToClipBoard = (content) => {
  const input = document.createElement("input");
  input.setAttribute("readonly", "readonly");
  input.setAttribute("value", content);
  document.body.appendChild(input);
  input.setSelectionRange(0, 9999);
  input.select();
  if (document.execCommand("copy")) {
    document.execCommand("copy");
    document.body.removeChild(input);
    message.info("成功复制到剪贴板");
  } else {
    message.warn("该浏览器不支持点击复制到剪贴板");
  }
};
